package com.one.blocks.rbac.enums;

import com.one.blocks.mvc.enums.CommonEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author linfuxin Created on 2022-02-14 10:40:49
 */
@Getter
@AllArgsConstructor
public enum RbacResponseEnum implements CommonEnum {

    /**
     * 服务级别错误码
     */
    UNKNOWN_ERROR(500, "服务异常"),

    /**
     * 无token
     */
    NO_ACCESS_TOKEN(601, "token is null"),

    /**
     * token失效
     */
    ILLEGAL_ACCESS_TOKEN(602, "token is invalid"),

    NO_PERMISSION(701, "require permission"),

    ILLEGAL_PASSWORD(801, "illegal password"),

    INCORRECT_LOGIN_INFO(802, "incorrect login info"),

    INCORRECT_USER_INFO(803, "incorrect user info"),

    REPEAT_REGISTER(804, "repeat register"),

    NO_APPLY_ID(901, "no applyId"),

    ILLEGAL_APPLY_ID(902, "illegal applyId"),

    /**
     * 存在关联数据
     */
    DELETE_ALLOCATED_DATA(1001, "存在关联数据"),

    /**
     * 异常的参数
     */
    BAD_REQUEST(1400, "异常的参数"),
    ;

    private final int code;
    private final String msg;
}
